<?php

namespace app\logic\admin;

class L_welcome
{
    /**
     * 系统信息
     * @return array
     */
    public function sysInfo()
    {
        $phpVersion=app("yifangSystemInfo")->phpVersion();
        $os=app("yifangSystemInfo")->os();
        $upload_max_filesize=app("yifangSystemInfo")->phpIniData("upload_max_filesize");
        $server=app("yifangSystemInfo")->server();
        $url=config("app.url");
        $sql="select VERSION() as version";
        $mysqlData=Db()->execute($sql);

        $info=array();
        $info["phpVersion"]=$phpVersion?$phpVersion["data"]:"";
        $info["osName"]=$os["osName"];
        $info["url"]=$url;
        $info["upload_max_filesize"]=$upload_max_filesize;
        $info["software"]=$server["software"];
        $info["mysqlVersion"]=$mysqlData?$mysqlData[0]["version"]:"";
        return $info;
    }
}